var lastvisit=new Object() lastvisit.firstvisitmsg="Selamat datang! Ini adalah kunjungan perdana anda di " //Change first visit message here lastvisit.subsequentvisitmsg=" [am]" //Change subsequent visit message here lastvisit.getCookie=function(Name){ //get cookie value var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair if (document.cookie.match(re)) //if cookie found return document.cookie.match(re)[0].split("=")[1] //return its value return "" } lastvisit.setCookie=function(name, value, days, visits){ //set cookei value var expireDate = new Date() if (expireDate.getTimezoneOffset() == 0) (a=expireDate.getTime() + (7*60*60*1000)) //set "expstring" to either future or past date, to set or delete cookie, respectively var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days)) document.cookie = name+"="+value+"; expires="+expireDate+"; path=/"; } lastvisit.showmessage=function(){ if (lastvisit.getCookie("visitcounter", visits)==""){ //if first visit lastvisit.setCookie("visitcounter", 2, 730) //set "visitcounter" to 2 and for 730 days (2 years) {alert(lastvisit.firstvisitmsg + document.location.host)} } else { }} lastvisit.showmessage() var waktu=new Date() var tahun=waktu.getFullYear() var hari=waktu.getDay() var bulan=waktu.getMonth() var tanggal=waktu.getDate() if (tanggal < 9) {tanggal=""+tanggal} var hariarray=new Array("Minggu","Senin","Selasa","Rabu","Kamis","Jum'at","Sabtu") var bulanarray=new Array("Januari","Pebruari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember") document.write() now = new Date(); if (now.getTimezoneOffset() == 0) (a=now.getTime() + (7*60*60*1000)) else (a=now.getTime()); now.setTime(a); hr = now.getDate() ; am = ( hr > 11 ) ? "pm" : "am"; document.write() var visits = getCookie("counter") if (!visits) visits = 1 else visits = parseInt(visits) + 1